<%-- 
    Document   : addDish
    Created on : Feb 19, 2013, 7:24:31 PM
    Author     : Vrety
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://displaytag.sf.net" prefix="display"%>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Add Dish</title>
        <script>
            function getFood(foodID) {
                var http = new XMLHttpRequest();
                var url = "AjaxSearchFoodServlet";
                var params = "foodID="+foodID;
                http.open("GET", url+"?"+params, true);
                http.Xonreadystatechange= function() {//Call a function when the state changes.
                    if(http.readyState == 4 && http.status == 200) {
                        document.getElementById('foodList').innerHTML=http.responseText;
                    }
                }
                http.send();
            }
        </script>
    </head>
    <link href="css/homeHeader.css" rel="stylesheet" type="text/css">
    <link href="css/bootstrap.css" rel="stylesheet" type="text/css">
    <body>
        <jsp:include page="adminHeader.jsp"/>
        <h1>Add Demo Dish</h1>

        <form action="AddDishServlet" method="POST"  enctype="multipart/form-data">

            <div id="foodList" class="inside-botton-content-left">
                <table>
                    <tr>
                        <td>Dish Name</td>
                        <td><input type="text" name="txtDishName" value="" /> </td>
                    </tr>
                    <tr>
                        <td>Calories</td>
                        <td><input type="text" name="txtCalories" value="" maxlength="4"  /></td>
                    </tr>
                    <tr>
                        <td>ImageURL</td>
                        <td><input type="file" name="txtImageURL" value="" /></td>
                    </tr>
                    <tr>
                        <td>Cooking</td>
                        <td><input type="text" name="txtCooking" value=""  /></td>
                    </tr>
                    <tr>
                        <td>Food Essential</td>
                        <td><input type="text" name="txtFoodIDEss" value="" /></td>
                        <td>Amount <input type="text" name="txtAmount1" value="" /></td>

                    </tr>
                    <tr>
                        <td>Food NonEssential</td>
                        <td><input type="text" name="txtFoodIDNon" value="" /></td>
                        <td>Amount <input type="text" name="txtAmount2" value="" /></td>
                    </tr>
                </table>
            </div>
            <div id="imageFood">

            </div>
            <input type="submit" value="Add" class="btn-primary"name="btnAction" />
        </form>
    </body>
</html>
